#ifndef CIRCULAR_QUEUE_H
#define CIRCULAR_QUEUE_H

#include "stdio.h"
#include "stdlib.h"

#define MAX_SIZE 11

typedef int ElemType;

typedef struct CircularQueue {
    ElemType data[MAX_SIZE];
    int front;
    int rear;
} CircularQueue;

CircularQueue* init_queue();

int is_empty(CircularQueue* queue);

int is_full(CircularQueue* queue);

int size(CircularQueue* queue);

int enqueue(CircularQueue* queue, ElemType data);

ElemType dequeue(CircularQueue* queue);

ElemType front(CircularQueue* queue);

ElemType rear(CircularQueue* queue);

void dequeue_all(CircularQueue* queue);

void clear_queue(CircularQueue* queue);

#endif  // CIRCULAR_QUEUE_H